﻿var youTubePlayerUrl = "<iframe width='420' height='315' src='";
var youTubePlayerEnd = "' frameborder='0' allowfullscreen></iframe>";

$(document).ready(function(){
	$('.youtubeurl').change(insertPreview);
})

var insertPreview = function(){

	var player = youTubePlayerUrl + $('.youtubeurl').text()) +  youTubePlayerEnd;
	$('.youtubeurl').html();

}